Copyright: © 1996-97 InstallShield Software Corp.                  Help version 129


InstallShield help is attempting to send you to the InstallShield Web site (www.installshield.com).


The ADO Template

The ADO Template provides a complete sample setup supporting ADO 1.1 and OLE DB 1.1.  The template installs a sample application, the OLE DB Provider (ODBC Provider), and the core ADO and OLE DB files.

The template comes complete with the source files for the provided drivers.  These redistributable files are located in subfolders of <InstallShield location>\TemplateData\ADO Template Data. The folder names match the names of the file groups that use the files.

Using this template

You can easily customize the template to install ADO and OLE DB with your application's setup. To test drive the sample setup, see Running the ADO Template sample setup.

If the template is similar to your application's needs, you may be able to make simple changes to use it to create your own setup.  For more information, see Customizing the ADO Template sample setup.

Or if you have an existing setup project that you want to add ADO and OLE DB support to, see Adding ADO and OLE DB support to an existing project.

Template requirements

The ADO Template generates a 32-bit setup that runs on Windows 95 and Windows NT 4.0 or later. The template will not run on any other platforms.

The template requires ODBC 3.x to be installed on the target system. To install ODBC 3.5, you can use the ODBC Core Template.

The sample application requires an ODBC-compatible data source to be installed on the target system. If you have the OLE DB 1.1 SDK installed, you can use the OLE_DB_NWind_Jet data source.

If you are using the OLE_DB_NWind_Jet data source and you installed the OLE DB SDK in a folder other than the default, you will need to reconfigure the OLE_DB_NWind_Jet data source to point to the Nwind.mdb file in the location where the OLE DB SDK is installed: Oledbsdk\Smpldata\Access\Nwind.mdb To reconfigure the OLE_DB_NWind_Jet data source, open the ODBC Administrator in Control Panel, select OLE_DB_NWind_Jet in the User DSN tab, and click Configure. Then, use the Select button in the resulting dialog to specify the Nwind.mdb file in the location where the OLE DB SDK is installed.

  See also

  Feedback


Running the ADO Template sample setup

Before you begin customizing the ADO Template sample setup, you should run the template sample setup without any modifications. Follow the steps below to see the template sample setup run:

1.	Create a new project using the ADO Template. Select New from the File menu of the InstallShield IDE. Select the Templates tab and then double-click the ADO Template icon. A new project with the name ADO Template is created. You can rename the new project, if desired, after closing it.

2.	Run the setup by selecting Run Setup from the Build menu. Remember that the ADO Template requires ODBC 3.x already installed on the target system.

3.	Run the installed application by clicking the ADO Sample Application icon in the Start\Programs menu. The sample application requires an ODBC-compatible data source to be installed on the target system.

4.	Enter a data source name in the DSN field. OLE_DB_NWind_Jet is the default entry.

	If you get an initialization failed error message indicating the file could not be found, you must use the ODBC Administrator to ensure the data source points to a valid data file.
5.	Enter Admin in the User field, leave Password blank, and leave msdasql in the Provider field.

6.	In the Table/Query/SQL field, enter an SQL statement, or accept the default if using OLE_DB_NWind_Jet.

7.	Click Execute. Data should be displayed in the Retrieved Rows field.

8.	If desired, you can uninstall the sample application by selecting ADO Sample Application from the Add/Remove Programs applet in the Control Panel.

  See also

Feedback


Customizing the ADO Template sample setup

Follow the steps below to customize the ADO Template to install your application. (If you need to use an existing project, see Adding ADO and OLE DB support to an existing project.)

Before you begin you may want to run the ADO Template setup without modifications, as described in Running the ADO Template sample setup, to verify that the template works correctly on your system.

1.	Customize the setup script as required by the needs of your setup. For example, you might want to change or remove the call to SdWelcome in the ShowDialogs user-defined function.

2.	Add the components, file groups, and setup types required to set up your application. All of your application's components that require ADO and OLE DB must include the ISADO Core component in their Required Components field.

3.	Replace the Setup.bmp splash screen graphic in the Splash Screen\Language Independent folder of the Setup Files pane with a splash screen of your own. If you do not wish to include a splash screen graphic, simply remove the provided Setup.bmp.

4.	Replace the License.txt file in the Language Independent\Operating System Independent folder of the Setup Files pane with your license agreement text.

5.	Compile, build, and test your project.

  See also

Feedback


Adding ADO and OLE DB support to an existing project

Adding ADO 1.1 and OLE DB 1.1 support to your project is a matter of reproducing the template's file links, file groups, components, and string table entries. Follow the steps below to add the OLE DB support provided in the ADO Template to an existing project.

	It will be easier to copy information from one project to another if you open the ADO Template and your setup project in separate instances of the InstallShield IDE.
1.	Recreate the ADO- and OLE DB-specific file groups in your project's File Groups pane.

a.	Duplicate the file groups' folder structure in your project's file groups pane. (You do not need to create a file group for the sample application. The ADO- and OLE DB-specific file groups all begin with ISADO.) For more information, see Create a file group.

b.	Give each new file group the same properties that it has in the ADO Template.

c.	Insert the same files into the file groups' Links folders.  For more information, see Organize my files into file groups .

2.	Recreate the ADO- and OLE DB-specific components in your project's Components pane. (You do not need to create a component for the sample application. The ADO- and OLE DB-specific components all begin with ISADO.) Give each new component the same properties that it has in the ADO Template.

Remember that all of your application's components that require ADO and OLE DB must include the ISADO Core component in their Required Components field.

3.	Copy the string table entries from the ADO Template to the string table (or string tables if your setup is intended for distribution in more than one language) in your project. The ADO- and OLE DB-specific string table entries all begin with ISADO_.

4.	Run the Media Build Wizard to build your new setup.

5.	Test your setup.

  See also

Feedback


The ADO Template components

The ADO Template consists of the components listed below:

Component	Notes

Sample Application	includes the sample application .exe file

ISADO OLE DB	contains the OLE DB self-registering and non-self-registering files to be installed into the Program Files\Common Files\System\OLE DB folder

ISADO ADO 	contains the ADO files to be installed into the Program Files\Common Files\System\ADO folder

ISADO System Self-reg	contains the self-registering and non-self-registering system files.  This is the component that your application must require to support ADO and OLE DB;  it, in turn, requires the components ISADO OLE DB and ISADO ADO.

	Never delete the ISADO-prefixed components.
  Feedback


Feedback
We welcome your suggestions for improving InstallShield help. To share your ideas, please visit http://www.installshield.com/talk/ or email doc@installshield.com.